package com.laolei.template.assist;

import java.io.ByteArrayOutputStream;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.View;

public class OutData {

	public static void out(View view) throws Exception {
		ByteArrayOutputStream  baos=new ByteArrayOutputStream();
		HttpServletRequest servletRequest= new TestHttpServletRequest();
		HttpServletResponse servletResponse= new TestHttpServletResponse(baos);
		view.render(BuildData.build(), servletRequest,servletResponse);
		servletResponse.flushBuffer();
		baos.close();
		System.err.println(baos.toString());
	}
}
